It's a more socially acceptable version of "shit happens".
It can be used to:
1)express condolences for someone's situation without offering any
apologetic words.
2)respond to a future problems that shows a sense of sadness/aggression towards it, but in a way without trying to complain
3)to
shrug off a one's own, or someone else's, minor annoyance
4)substitute for an actual response, while still continuing the conversation